##### Script models#####
library(stats)
germL1 <- glm(Gemination ~ OxP*AC,family=poisson(link="log"),data = L1,na.action=na.omit)
summary(germL1)
AIC(germL1)
anova(germL1,test="Chisq")
library("lsmeans")
lsmeans(germL1, pairwise~OxP, test="Chisq")
plot(germL1)


library(stats)
hiL23<-glm(Initialplantheight~OxP*AC+Germination+deadseedlings,family=Gamma(link=identity),data=L2,na.action=na.omit)
summary(hiL23)
AIC(hiL23)
anova(hiL23,test="Chisq")
shapiro.test(residuals(hiL23))
plot(hiL23)
library("lsmeans")
lsmeans(hiL23, pairwise~OxP, test="Chisq")
lsmeans(hiL23, pairwise~AC, test="Chisq")


library(stats)
sL23<-glm(stembiomass~OxP*AC+Initialplantheight+Germination+deadseedlings,family=Gamma(link=identity),data=L2,na.action=na.omit)
summary(sL23)
AIC(sL23)
anova(sL23,test="Chisq")
shapiro.test(residuals(sL23))
plot(sL23)
library("lsmeans")
lsmeans(sL23, list(pairwise ~ OxP))
lsmeans(sL23, list(pairwise ~ AC))
lsmeans(sL23, list(pairwise ~ AC|OxP, pairwise ~ AC|OxP))


library(stats)
rL21<-glm(rootbiomass~OxP*AC+Initialplantheight+Germination+deadseedlings,family=Gamma(link=identity),data=L2,na.action=na.omit)
summary(rL21)
AIC(rL21)
anova(rL21,test="Chisq")
shapiro.test(residuals(rL21))
plot(rL21)
library("lsmeans")
lsmeans(rL21, list(pairwise ~ OxP))
lsmeans(rL21, list(pairwise ~ AC))
lsmeans(rL21, list(pairwise ~ AC|OxP, pairwise ~ AC|OxP))
